package cn.uce.cc.srv.client;

import com.ymdd.dorado.kernel.configuration.OpenFeign;
import feign.Body;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.Map;

@FeignClient(value = "ccosInterfaceClient", url = "${ics.url}" , configuration = OpenFeign.class)
public interface CcosInterfaceClient {

    //查询问题件接口
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getAbnormalList")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getWayBillProblem(@Param("body") String msg);

    //查询问题件接口
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/abnormalListInfo")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getWayBillProblems(@Param("body") String msg);

    //查询问题件详情接口
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/abnormalInfo")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getWayBillProblemDetail(@Param("body") String msg_temp);

    //查询问题件详情接口
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getAbnormal")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getWayBillProblemDetails(@Param("body") String msg_temp);

    /**
     * 查询开放平台桥接方法
     * @param toJSONString
     * @return
     */
    @RequestLine("POST /galaxy-openplatform-business/service/bridge")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String queryOpenPlatFronBridge(String toJSONString);


    /**
     * 查询快运的网点机构
     * @return
     */
    @RequestLine("GET /galaxy-base-business/api/dept/fuzzyQueryDeptsPage?" +
            "deptCode={deptCode}&currentPage={currentPage}&" +
            "pageSize=10&" +
            "compCode=yimidida&" +
            "deptTypes=0,1,2,3,4,5,6,7&"+
            "status=1")
//    @Headers("Content-Type: application/json")
    String getWebPointsForWorkOrder(@Param("deptCode") String deptCode,@Param("currentPage") String currentPage);

    /**
     * 根据运单号查询运单信息
     * @param jsonObject
     * @return
     */
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getExtendFee")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String waybillQueryByWaybillNo(String jsonObject);


    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getArbComplaintsList")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getArbitrationInfoByWBNo(@Param("body") String msg_temp);


    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getArbComplaints")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getComplaintByCONo(@Param("body") String msg_temp);

    @RequestLine("POST /galaxy-base-business/api/dept/fuzzyQueryDeptsPage")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getComplaintNetWorkByKeyWords(@Param("body") Map<String, String> map);


    /**
     * 根据快运运单编号查询签收记录
     * @param msg_temp
     * @return
     */
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getWaybillSign")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String waybillSignQueryByWaybillNo(@Param("body") String msg_temp);



    /**
     * 根据运单编号查询转款记录
     * @param waybillNo 运单号
     * @return
     */
    @RequestLine("GET /galaxy-finance-business/sys/cop/sendMoneyApi/queryTranCop?waybillNo={waybillNo}")
    String getVaInfoVoByWBNo(@Param("waybillNo") String waybillNo);

     /**
       * 查询物流轨迹
       * @Author liupan
       * @Description
       * @Date  2020-07-04 14:07
       */
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getwaybilltrack")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getRoutingLocusInfoByWBNo(@Param("body") String toJSONString);


     /**
       * prefixPubApi + propertyResolver.getProperty("pub.interface.url.networkquery");
       * 非经过开放平台
       * 查询网点信息
       * @Author liupan
       * @Description
       * @Date  2020-07-04 14:16
       */
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getdeptdetail")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getNetWorkInFo(@Param("body") String msg_temp);

    /**
     * prefixPubApi + propertyResolver.getProperty("pub.interface.url.detialquerybydeptcode");
     * 非经过开放平台
     * 查询网点详情
     * http://10.206.35.151:9088/galaxy-base-business/api/dept/queryDepartmentByDeptCode?deptCode=021MU
     * @return
     */
    @RequestLine("GET /galaxy-base-business/api/dept/queryDepartmentByDeptCode?deptCode={deptCode}")
    String getNetDetial(@Param("deptCode") String deptCode);

    /**
     *  orderPostFromOnline = prefixPubApi + propertyResolver.getProperty("pub.interface.url.orderpostfromonline");
     * 非经过开放平台
     * ccos在线下单
     * @param msg_temp
     * @return
     */
    @RequestLine("POST /galaxy-openplatform-business/common/saveOutOrderToYmOrder")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String saveOrder(@Param("body") String msg_temp);



    /**
     *
     *不经过开放平台
     * 对话框查询路由时效
     * @param msg_temp
     * @return
     */
    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getRouteTime")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String routDetilInfo(@Param("body") String msg_temp);

    @Headers({"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"})
    @RequestLine("GET /galaxy-finance-business/cop/operation/queryCopLogByWaybillNo?waybillNo={waybillNo}")
    String getReceiptMoney(@Param("waybillNo") String waybillNo);



    @RequestLine("POST /galaxy-openplatform-business/callhjenter/getWaybillChange")
    @Headers("Content-Type: application/json")
    @Body("{body}")
    String getWayBillChangeInfo(@Param("body") String wayBillNum);


}